#!/usr/bin/env python
# -*- coding: utf-8 -*-

'''
lib.Enum(set)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
枚举
init:
    a = Enum("enum1","enum2","enum3","enum4")
'''

class Enum(set):
    def __getattr__(self,name):
        if name.upper() in self:
            return name.upper()
        raise AttributeError